<?
require("config.php");

$show_backnav = "menu";
$location_status .= "| Enquire";


$menutype = 2;

if (NULL!=$action){

   $Query = "delete from $table where id=$id Limit 1";

   myQuery($Query);


   header("location:" . $rela_path . "share/msg.php?v=733");

   exit();

}


if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");
  
}

$Query = "select 
	code,
	contact_date,
	name,
	phone,
	fax,
	email,
	city,
	country,
	trainer,
	booking_time,
	via,
	coaching_type,
	message,
	payment,
	status, lastname,
company,
position,
mobile,
address,
street,
state,
zip, paddress,
pstreet,
pstate,pzip,	pcity,
	pcountry 
from $table where id='$id' Limit 1";
$r = myQuery($Query);


	$Code=$r[0][0];
	$Contact_Date=$r[0][1];
	$Name=$r[0][2];
	$Phone=$r[0][3];
	$Fax=$r[0][4];
	$Email=$r[0][5];
	$City=$r[0][6];
	$Country=$r[0][7];
	$Trainer=$r[0][8];
	$BookingTime=$r[0][9];
	$Via=$r[0][10];
	$Coaching_type=$r[0][11];
	$Message=$r[0][12];
	$Payment=$r[0][13];
	$Status=$r[0][14];
		$Lastname= $r[0][15];

$Company= $r[0][16];
$Position= $r[0][17];
$Mobile= $r[0][18];
$Address= $r[0][19];
$Street= $r[0][20];
$State= $r[0][21];
$Zip= $r[0][22];
$Paddress= $r[0][23];
$Pstreet= $r[0][24];
$Pstate= $r[0][25];
$Pzip= $r[0][26];
	$Pcity=$r[0][27];
	$Pcountry=$r[0][28];
require($rela_path . "inc/header.php");
require($rela_path . "bin/date.php");
?>

<!--Content Start-->
<form action="" method="post" enctype="multipart/form-data" name="form1">  
<!--hidden filed-->
<input name="id" type="hidden" value="<?print($id)?>">
<input name="action" type="hidden" value="delete">

  <table width="95%" border="0" align="center">
                      <tr> 
                        
      <td>&nbsp; </td>
                      </tr>
                      <tr> 
                        
      <td>
        <table border="0">
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td class="tdheader">Booking No. :</td>
            <td> <?print($Code)?> </td>
          </tr>

          <tr> 
            <td class="tdheader">Status :</td>
            <td>
			
<?
$sourceData = array(

"0",
"1",
"2",
"3",
"4",
"5",
"6",

);


$sourceLabel = array(

"Non-paid",
"Paid by PayPal",
"Paid",
"Coach has contacted client",
"In coaching",
"Cancelled",
"Finished",

);

for ($i=0;$i<count($sourceLabel);$i++){
	if($Status==$sourceData[$i]) echo $sourceLabel[$i];
}

?></td>
          </tr>


          <tr> 
            <td class="tdheader">Contact Date :</td>
            <td><?print(OutDate($Contact_Date))?></td>
          </tr>
          <tr>
            <td><font color="red">*</font> First Name</td>
            <td><?echo $Name?></td>
          </tr>
          <tr>
            <td><font color="red">*</font> Last Name</td>
            <td><?echo $Lastname?></td>
          </tr>
          <tr>
            <td><font color="red">*</font> Company </td>
            <td><?echo $Fax?> </td>
          </tr>
          <tr>
            <td><font color="red">*</font> Position / Profession </td>
            <td><?echo $Position?></td>
          </tr>
          <tr>
            <td><font color="red">* </font>E-mail</td>
            <td><?echo $Email?></td>
          </tr>
          <tr>
            <td><font color="red">*</font> Phone</td>
            <td><?echo $Phone?></td>
          </tr>
          <tr>
            <td><font color="red">*</font> Mobile </td>
            <td><?echo $Mobile?></td>
          </tr>
          <tr>
            <td><font color="red">*</font> Address </td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><font color="red">&nbsp; </font> Street </td>
          <td><?echo $Street?></td>
        </tr>
        <tr>
          <td> City</td>
          <td><?echo $City?></td>
        </tr>
        <tr>
          <td><font color="red">&nbsp; </font> State / Province </td>
          <td><?echo $State?></td>
        </tr>
        <tr>
          <td> ZIP / Postal Code </td>
          <td><?echo $Zip?></td>
        </tr>
        <tr>
          <td class="tdheader">Country :</td>
          <td><?echo $Country?></td>
        </tr>
        <tr>
          <td><font color="red">*</font> Private Address </td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><font color="red">&nbsp; </font> Street </td>
          <td><?echo $Pstreet?></td>
        </tr>
        <tr>
          <td> City</td>
          <td><?echo $Pcity?></td>
        </tr>
        <tr>
          <td><font color="red">&nbsp; </font> State / Province </td>
          <td><?echo $Pstate?></td>
        </tr>
        <tr>
          <td> ZIP / Postal Code </td>
          <td><?echo $Pzip?></td>
        </tr>
        <tr>
          <td class="tdheader">Country :</td>
          <td><?echo $Pcountry?></td>
          </tr>
          <tr> 
            <td class="tdheader">Trainer selected :</td>
            <td> 
              <?echo $Trainer?>            </td>
          </tr>
          <tr> 
            <td class="tdheader">Booking Time :</td>
            <td><?print(OutTime($BookingTime))?></td>
          </tr>
          <tr> 
            <td class="tdheader">Coaching via</td>
            <td> <?print($Via)?>            </td>
          </tr>








          <tr> 
            <td class="tdheader">Coaching Type :</td>
            <td> 

<?
$Query="select 
	  code,
	  content,
	  testimonial,
	  publish,
	  description1,
	  currency1,
	  fee1,
	  publish1,
	  description2,
	  currency2,
	  fee2,
	  publish2,
	  description3,
	  currency3,
	  fee3,
	  publish3,
	  description4,
	  currency4,
	  fee4,
	  publish4,
	  description5,
	  currency5,
	  fee5,
	  publish5,
	  description6,
	  currency6,
	  fee6,
	  publish6,
	  description7,
	  currency7,
	  fee7,
	  publish7,
	  description8,
	  currency8,
	  fee8,
	  publish8,
	  description9,
	  currency9,
	  fee9,
	  publish9,
	  description10,
	  currency10,
	  fee10,
	  publish10 
from course_coach_booking_content limit 1";
$r=myQuery($Query);

		$Code=$r[0][0];
		$Content=$r[0][1];
		$Testimonial=$r[0][2];
		$Publish=$r[0][3];
		$Description1=$r[0][4];
		$Currency1=$r[0][5];
		$Fee1=$r[0][6];
		$Publish1=$r[0][7];
		$Description2=$r[0][8];
		$Currency2=$r[0][9];
		$Fee2=$r[0][10];
		$Publish2=$r[0][11];
		$Description3=$r[0][12];
		$Currency3=$r[0][13];
		$Fee3=$r[0][14];
		$Publish3=$r[0][15];
		$Description4=$r[0][16];
		$Currency4=$r[0][17];
		$Fee4=$r[0][18];
		$Publish4=$r[0][19];
		$Description5=$r[0][20];
		$Currency5=$r[0][21];
		$Fee5=$r[0][22];
		$Publish5=$r[0][23];
		$Description6=$r[0][24];
		$Currency6=$r[0][25];
		$Fee6=$r[0][26];
		$Publish6=$r[0][27];
		$Description7=$r[0][28];
		$Currency7=$r[0][29];
		$Fee7=$r[0][30];
		$Publish7=$r[0][31];
		$Description8=$r[0][32];
		$Currency8=$r[0][33];
		$Fee8=$r[0][34];
		$Publish8=$r[0][35];
		$Description9=$r[0][36];
		$Currency9=$r[0][37];
		$Fee9=$r[0][38];
		$Publish9=$r[0][39];
		$Description10=$r[0][40];
		$Currency10=$r[0][41];
		$Fee10=$r[0][42];
		$Publish10=$r[0][43];
		

$sourceLabel = array(
	"None" . "<BR>",
	$Description1 . " fee " . $Currency1 . $Fee1 . "<BR>",
	$Description2 . " fee " . $Currency2 . $Fee2 . "<BR>",
	$Description3 . " fee " . $Currency3 . $Fee3 . "<BR>",
	$Description4 . " fee " . $Currency4 . $Fee4 . "<BR>",
	$Description5 . " fee " . $Currency5 . $Fee5 . "<BR>",
	$Description6 . " fee " . $Currency6 . $Fee6 . "<BR>",
	$Description7 . " fee " . $Currency7 . $Fee7 . "<BR>",
	$Description8 . " fee " . $Currency8 . $Fee8 . "<BR>",
	$Description9 . " fee " . $Currency9 . $Fee9 . "<BR>",
	$Description10 . " fee " . $Currency10 . $Fee10 . "<BR>",
);

$sourceData = array(
	"0",
	"1",
	"2",
	"3",
	"4",
	"5",
	"6",
	"7",
	"8",
	"9",
	"10"
);


for ($i=0;$i<count($sourceLabel);$i++){
	if($Coaching_type==$sourceData[$i]) echo $sourceLabel[$i];
}
?>			  </td>
          </tr>



          <tr> 
            <td class="tdheader">Payment method :</td>
            <td> <?print($Payment)?>            </td>
          </tr>


          <tr> 
            <td class="tdheader">Message :</td>
            <td><?echo $Message?></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>

</form>
<!--Content End-->
<?require($rela_path . "inc/footer.php");?>
        